#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef double db;

#define in read()
#define pii pair<int,int>
#define fi first
#define se second
#define FILE(x) freopen(x".in","r",stdin);\
	freopen(x".out","w",stdout);
#define pb push_back

int read(){
	int x = 0,sgn = 1;char ch = getchar();
	for(;!isdigit(ch);ch = getchar()) if(ch == '-') sgn = -1;
	for(;isdigit(ch);ch = getchar()) x = (x<<1)+(x<<3)+(ch^48);
	return x*sgn;
}

const int N = 1e5+10;

int h[N],cnt=1,fa[N],n,m,x,y;
bool v[N<<1],to[N],vis[N];
struct edge{int v,nxt;}e[N<<1];
void link(int x,int y){e[++cnt] = (edge){y,h[x]};h[x] = cnt;}

void dfs(int x){
	vis[x] = 1;
	for(int i = h[x],y;i;i = e[i].nxt){
		if(vis[y = e[i].v]) continue;
		v[i] = 1; fa[y] = x;
		dfs(y);
	}
}

void limit(int x){
	for(int i = h[x];i;i = e[i].nxt){
		if(v[i] && e[i].v != fa[x]) limit(e[i].v);
	}if(x == 1) return;
	if(to[x]) printf("%d %d\n",x,fa[x]);
	else printf("%d %d\n",fa[x],x),to[fa[x]]^=1;
}

int main (){
#ifndef ONLINE_JUDGE
	freopen("1.in","r",stdin);
#endif
	n = in,m = in;if(m & 1)return puts("-1"),0;
	for(int i = 1;i <= m;i++) x = in,y = in,link(x,y),link(y,x);
	dfs(1);
	for(int x = 1;x <= n;x++)
		for(int i = h[x];i;i = e[i].nxt){
			if(v[i] || v[i^1] || (i & 1)) continue; to[x] ^= 1;
			printf("%d %d\n",x,e[i].v);
		}
	limit(1);
	return 0;
}
